class_name Soldier
extends Node2D

var health = 6

func hurt():
	health -= 1
	if health<0:
		queue_free()


func _on_area_2d_body_entered(body: Node2D) -> void:
	if body is Enemy:
		body.die()
